The present invention generally relates to a method and a system for updating routes on a client computer, more particularly, it relates to a method and system for automatically updating routes in a route table located on a computer operatively connected to one or more peripheral devices.
It is very common for a computer to be connected to multiple peripheral devices, such as a printer or scanner. The computer maintains a route table for various gateways and addresses to the multiple peripheral device and network. The route table is then used by the computer to determine where to forward packets on the local network.
As shown in FIG. 1, each route table Entry includes a network address, a netmask, a gateway address, an interface, and a metric. The interface is the computer""s Internet protocol (xe2x80x9cIPxe2x80x9d) address, which is the address from which the packets are sent. In a network with multiple peripheral devices, it is common to have several network cards and IP addresses assigned to the computers. For example, a Network Interface Card IP address is an IP address that is bound to the Network Interface Card (xe2x80x9cNICxe2x80x9d) that uniquely identifies the client computer on a network, which will be referred to as a NIC IP address. There can be more than one NIC, therefore, there may be more than one NIC IP address.
Next, the network address identifies a destination network address, which can be the address of a host or a network, whereas the gateway address is the address where the computer will forward a packet. Similarly, for each peripheral device used by the computer, an IP address is assigned, which will be referred to as a Device IP address. The Device IP address identifies the peripheral device to the client computer, and the NIC IP address uniquely identifies the client computer on a network. Therefore, an operatively connected NIC IP address must be bound to each Device IP address.
There is also a gateway address, which is used only when the computer cannot find the route to the destination IP address in a packet. This is similar to a default address for lost packets. The last address is the Netmask address, which identifies a subnet portion of the destination IP address. Finally, a metric column is used to keep track of an arbitrarily assigned cost for using a particular route. A higher number indicates a higher cost for the use of that particular route. Generally, the metric column is used for determining the best route when there is more than one route to get a packet to its destination.
When a computer uses a static IP address, all the IP addresses described for routing generally remain unchanged when the computer is turned off or rebooted. Furthermore, the NIC IP addresses also remain valid since the same Device IP address that was paired with the NIC IP address remained unchanged. As a result, it is easier to keep track of the routing on a computer using a static IP address. However, on a computer whose IP address changes, for example through an Automatic Private IP Addressing (xe2x80x9cAPIPAxe2x80x9d) algorithm, a new IP address is assigned to the computer every time it logs on. When using a Dynamic Host Configuration Protocol (xe2x80x9cDHCPxe2x80x9d) or similar technology, the permanent route through a given gateway is possibly no longer valid since the validity of the route is based upon the IP address obtained at the time the route was created. Thus, the use of a nonstatic IP address will result in invalid routes after the client computer reboots.
Previously, the user had to manually remove the old route and enter a new route to the peripheral device if a route is invalid. One problem is that this manual method generally requires someone with some understanding in network routing to perform the rerouting and edit the route table. However, a typical user does not generally know how to change the routes to these peripheral devices.
Accordingly, an object of the present invention is to provide an improved method for updating routes in a route table on a client computer automatically after the client computer""s IP address is changed.
Another object of the present invention is to provide an improved method for updating routes in a route table on a client computer without user invention.
Still another object of the present invention is to provide an improved method for updating routes in a route table on a client computer using a nonstatic IP address.
The present invention generally relates to a method and a system for updating routes on a client computer. More particularly, it relates to a method and system for automatically updating routes in a route table located on a computer operatively connected to one or more peripheral devices. The present method and system can update routes in a route table on a client computer without user intervention. As a result, the present invention accommodates a client computer using a nonstatic IP address by updating routes in the route table automatically every time the computer reboots.
The present invention first determines whether a first Device IP address in a maintenance list is communicating with the client computer. When the first Device IP address is not communicating with the client computer, a NIC IP list is created, which includes all the NIC IP addresses bound to a Device IP address on the client computer. Then, a route table entry with the first Device IP address and a NIC IP address from the NIC IP list is added to the route table.